import { BasicComponent } from './basic/basic.component';
import { CustomizeComponent } from './customize/customize.component';

export const LinkConfig = {
  location: 'Link',
  description: '链接到另一个页面的交互组件。',
  description_en: 'Interaction that links to another page.',
  component: [
    {
      demo: BasicComponent,
      codePath: 'showcase/link/basic/basic.component',
      demoTitle: '基础',
      demoTitle_en: 'Basic',
      demoDescription: '链接的状态分为primary和normal两种。',
      demoDescription_en: 'The link status can be primary or normal.',
    },
    {
      demo: CustomizeComponent,
      codePath: 'showcase/link/customize/customize.component',
      demoTitle: '图标',
      demoTitle_en: 'Icon',
      demoDescription: '通过lvIcon设置带图标的链接，设置为true时候显示默认图标。',
      demoDescription_en: 'Use lvIcon to set the link with an icon. If this parameter is set to true, the default icon is displayed.',
    },
  ],
  useRule: [],
  useSuggestion: ['如果需要处理onclick事件，需自行添加"$event.preventDefault()"和"$event.stopPropagation()"来阻止链接的跳转行为。'],
  useSuggestion_en: ['To process the onclick event, add $event.preventDefault() and $event.stopPropagation() to prevent link jumping.'],
  selector: 'lv-link',
  snippet: `<lv-link lvType="\${1:type}">\${2: type}</lv-link>`,
  api: [
    {
      attribute: 'lvType',
      type: 'primary | normal',
      default: 'primary',
      description: '链接类型。',
      description_en: 'Link type.',
    },
    {
      attribute: 'lvIcon',
      type: 'boolean | string',
      default: 'false',
      description: '链接图标。',
      description_en: 'Link icon.',
    }
  ],
  event: [],
};

